package cn.yunhe.video.Service.impl;


import cn.yunhe.video.Service.IUserInfoService;
import cn.yunhe.video.dao.IUserInfoMapper;
import cn.yunhe.video.entity.UserInfo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserInfoService extends ServiceImpl<IUserInfoMapper, UserInfo> implements IUserInfoService {

    @Autowired
    private IUserInfoMapper userInfoMapper;

    @Override
    public UserInfo getUserInfoByName(UserInfo userInfo) {
        return userInfoMapper.getUserInfoByName(userInfo);
    }

    @Override
    public boolean updateUserInfo(UserInfo userInfo) {
        int num = userInfoMapper.updateUserInfo(userInfo);
        if(num>0){
            return true;
        }else{
            return false;
        }
    }


}
